 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Karyotype DAS client</title>

<style type="text/css">
body {
    margin:0;
    padding:0;
}
</style>
<!--
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/reset/reset-min.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/fonts/fonts-min.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/base/base-min.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/datatable/assets/skins/sam/datatable.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/container/assets/container.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/container/assets/skins/sam/container.css"> 
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/resize/assets/skins/sam/resize.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/button/assets/skins/sam/button.css" />


-->
<link rel="stylesheet" type="text/css" href="build/reset/reset-min.css">
<link rel="stylesheet" type="text/css" href="build/fonts/fonts-min.css">
<link rel="stylesheet" type="text/css" href="build/base/base-min.css">
<link rel="stylesheet" type="text/css" href="build/datatable/assets/skins/sam/datatable.css">
<link rel="stylesheet" type="text/css" href="build/container/assets/skins/sam/container.css"> 

<link rel="stylesheet" type="text/css" href="build/button/assets/button.css" />

<!--
<link rel="stylesheet" type="text/css" href="build/container/assets/container.css">
<link rel="stylesheet" type="text/css" href="build/resize/assets/skins/sam/resize.css">
<link rel="stylesheet" type="text/css" href="build/button/assets/skins/sam/button.css" />
-->


<link rel="stylesheet" type="text/css" href="dasBrowser.css">
<!--
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/event/event-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/connection/connection-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/element/element-beta-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/datasource/datasource-beta-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/datatable/datatable-beta-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/container/container-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/animation/animation-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/dragdrop/dragdrop-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/button/button-min.js"></script>

-->

<script type="text/javascript" src="build/yahoo/yahoo-min.js"></script>
<script type="text/javascript" src="build/event/event-min.js"></script>
<script type="text/javascript" src="build/connection/connection-min.js"></script>
<script type="text/javascript" src="build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="build/element/element-beta-min.js"></script>

<script type="text/javascript" src="build/datasource/datasource-beta-min.js"></script>
<script type="text/javascript" src="build/datatable/datatable-beta-min.js"></script>
<script type="text/javascript" src="build/dragdrop/dragdrop-min.js"></script> 
<script type="text/javascript" src="build/container/container-min.js"></script>
<script type="text/javascript" src="build/animation/animation-min.js"></script>
<script type="text/javascript" src="build/button/button-min.js"></script>


<!--

-->


<script type="text/javascript" src="init.js"></script>
<script type="text/javascript" src="start.js"></script>
<script>
YAHOO.dasBrowser.genome.karyotypeStructure.dsn.selectedDsn.id = 'Homo_sapiens.GRCh37.reference';
var source00 = new Object();
source00.id = 'blat_masked'; // String, lo que quieras 
source00.url = 'http://beta.gepas.bioinfo.cipf.es/dasviewer-0.0.1/das/blat_masked/features'; // String, algo como esto
source00.name = 'blat_masked'; // String
source00.label = ['Blat NCBI masked']; // Array
source00.description = 'Blat NCBI masked'; // String
source00.representation = 'chart';// chart or mark
YAHOO.dasBrowser.genome.annotations.sources.push(source00);
</script>
<!--
<script>
YAHOO.dasBrowser.genome.karyotypeStructure.dsn.selectedDsn.id = "Homo_sapiens.GRCh37.reference";

/* URL comments
 * Por ejemplo en uniprot el URL seria ... http://www.ebi.ac.uk/das-srv/uniprot/das/aristotle/features
 * al que yo anyadiria ... ?segment=UPI00000017EA
 * para obtner ... http://www.ebi.ac.uk/das-srv/uniprot/das/aristotle/features?segment=UPI00000017EA
 */

var source01 = new Object();
source01.id = 'DS_224';
source01.url ='http://das.ensembl.org/das/toronto_poly/features';
source01.name ='toronto poly';
source01.label =['ENSEMBL'];
source01.description ='toronto poly ids, copy number variations, group ids and notes';
source01.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source01);

var source02 = new Object();
source02.id = 'DS_224';
source02.url ='http://das.ensembl.org/das/toronto_poly/features';
source02.name ='toronto poly';
source02.label =['ENSEMBL'];
source02.description ='toronto poly ids, copy number variations, group ids and notes';
//source02.representation ='mark';
source02.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source02);

var source03 = new Object();
source03.id = 'DS_224';
source03.url ='http://das.ensembl.org/das/toronto_poly/features';
source03.name ='toronto poly';
source03.label =['ENSEMBL'];
source03.description ='toronto poly ids, copy number variations, group ids and notes';
YAHOO.dasBrowser.genome.annotations.sources.push(source03);

var source04 = new Object();
source04.id = 'DS_224';
source04.url ='http://beta.gepas.bioinfo.cipf.es/dasviewer-0.0.1/dasserver?id=karyoviewfile_mir_txt%26cmd=features';
source04.name ='condor_human';
source04.label =['ENSEMBL'];
source04.description ='CONDOR CNE coordinates for the human genome';
source04.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source04);	

var source05 = new Object();
source05.id = 'DS_224';
source05.url ='http://das.ensembl.org/das/toronto_poly/features';
source05.name ='toronto poly';
source05.label =['ENSEMBL'];source06.name ='condor_human';
source05.description ='toronto poly ids, copy number variations, group ids and notes';
source05.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source05);	
	
	
var source03 = new Object();
source03.id = 'DS_224';
source03.url ='http://beta.gepas.bioinfo.cipf.es/dasviewer-0.0.1/dasserver?id=demo_19711966%26cmd=features';
source03.name ='toronto poly';
source03.label =['ENSEMBL'];
source03.description ='toronto poly ids, copy number variations, group ids and notes';
source03.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source03);

var source03 = new Object();
source03.id = 'DS_224';
source03.url ='http://beta.gepas.bioinfo.cipf.es/dasviewer-0.0.1/dasserver?id=demo_19711966%26cmd=features';
source03.name ='toronto poly';
source03.label =['ENSEMBL'];
source03.description ='toronto poly ids, copy number variations, group ids and notes';
source03.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source03);



var source04 = new Object();
source04.id = 'DS_224';
source04.url ='http://beta.gepas.bioinfo.cipf.es/dasviewer-0.0.1/dasserver?id=karyoviewfile_mir_txt%26cmd=features';
source04.name ='condor_human';
source04.label =['ENSEMBL'];
source04.description ='CONDOR CNE coordinates for the human genome';
source04.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source04);	


var source041 = new Object();
source041.id = 'DS_224';
source041.url ='http://beta.gepas.bioinfo.cipf.es/dasviewer-0.0.1/dasserver?id=karyoviewfile_mir_txt%26cmd=features';
source041.name ='condor_human';
source041.label =['ENSEMBL'];
source041.description ='CONDOR CNE coordinates for the human genome';
source041.representation ='mark';
YAHOO.dasBrowser.genome.annotations.sources.push(source041);	

var source042 = new Object();
source042.id = 'DS_224';
source042.url ='http://beta.gepas.bioinfo.cipf.es/dasviewer-0.0.1/dasserver?id=karyoviewfile_mir_txt%26cmd=features';
source042.name ='condor_human';
source042.label =['ENSEMBL'];
source042.description ='CONDOR CNE coordinates for the human genome';
source042.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source042);	

var source043 = new Object();
source043.id = 'DS_224';
source043.url ='http://beta.gepas.bioinfo.cipf.es/dasviewer-0.0.1/dasserver?id=karyoviewfile_mir_txt%26cmd=features';
source043.name ='condor_human';
source043.label =['ENSEMBL'];
source043.description ='CONDOR CNE coordinates for the human genome';
source043.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source043);	

var source044 = new Object();
source044.id = 'DS_224';
source044.url ='http://beta.gepas.bioinfo.cipf.es/dasviewer-0.0.1/dasserver?id=karyoviewfile_mir_txt%26cmd=features';
source044.name ='condor_human';
source044.label =['ENSEMBL'];
source044.description ='CONDOR CNE coordinates for the human genome';
source044.representation ='mark';
YAHOO.dasBrowser.genome.annotations.sources.push(source044);	


var source03 = new Object();
source03.id = 'DS_224';
source03.url ='http://beta.gepas.bioinfo.cipf.es/dasviewer-0.0.1/dasserver?id=demo_19711966%26cmd=features';
source03.name ='toronto poly';
source03.label =['ENSEMBL'];
source03.description ='toronto poly ids, copy number variations, group ids and notes';
source03.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source03);


var source07 = new Object();
source07.id = 'DS_493';
source07.url ='http://www.ebi.ac.uk/das-srv/genomicdas/das/eqtl_rat_cis_fat/features';
source07.name ='eQTL cis RI fat';
source07.label =['ENSEMBL'];
source07.description ='Expression Quantitative Trait Loci (cis) for Rattus norvegicus.';
source07.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source07);

var source08 = new Object();
source08.id = 'DS_493';
source08.url ='http://www.ensembl.org/das/Canis_familiaris.BROADD2.reference/features';
source08.name ='eQTL cis RI fat';
source08.label =['ENSEMBL'];
source08.description ='Expression Quantitative Trait Loci (cis) for Rattus norvegicus.';
source08.representation ='chart';
YAHOO.dasBrowser.genome.annotations.sources.push(source08);

</script>
<script>
YAHOO.dasBrowser.genome.karyotypeStructure.dsn.selectedDsn.id = "Rattus_norvegicus.RGSC3.4.reference";
</script>
-->

<script type="text/javascript" src="karyotypeRequests.js"></script>
<script type="text/javascript" src="dasParsers.js"></script>
<script type="text/javascript" src="classes.js"></script>

<script type="text/javascript" src="util.js"></script>
<script type="text/javascript" src="karyotypeStructureFunctions.js"></script>
<script type="text/javascript" src="drawKaryotypeStructure.js"></script>
<script type="text/javascript" src="drawAnnotations.js"></script>
<script>

// Here javascript code

function calculateChromosomeBandDrawRequestNumber(){
	var isNullKaryotypeFeatures = YAHOO.lang.isNull(YAHOO.dasBrowser.genome.karyotypeStructure.dsn.selectedDsn.karyotypeLocation);
	var repNumberChromosome = 1;
	var repNumberKaryotype = YAHOO.dasBrowser.genome.karyotypeStructure.entryPoints.selectedEntryPoints.ids.length;
	if(isNullKaryotypeFeatures){
		var repTotal = 0
	} else {
		var repTotal = repNumberChromosome + repNumberKaryotype;
	}
	return repTotal 
	//YAHOO.dasBrowser.genome.request.drawing.chromosomeBands.total = repNumberBand + repNumberChromosome + repNumberKaryotype;
}

function calculateAnnotationDrawRequestNumber(){
	var isNullKaryotypeFeatures = YAHOO.lang.isNull(YAHOO.dasBrowser.genome.karyotypeStructure.dsn.selectedDsn.karyotypeLocation);
	if (isNullKaryotypeFeatures) {
		var repNumberBand = 0;
	} else {
		var repNumberBand = 1;
	}
	
	var repNumberChromosome = 1;
	var repNumberKaryotype = YAHOO.dasBrowser.genome.karyotypeStructure.entryPoints.selectedEntryPoints.ids.length;
	var repNumberSources = YAHOO.dasBrowser.genome.annotations.sources.length;
	var repTotal = (repNumberBand + repNumberChromosome + repNumberKaryotype) * repNumberSources;
	return repTotal 
	//YAHOO.dasBrowser.genome.request.drawing.chromosomeBands.total = repNumberBand + repNumberChromosome + repNumberKaryotype;
}

YAHOO.dasBrowser.genome.request.drawing.isCompleted = function(){
	var bandRequests = YAHOO.dasBrowser.genome.request.drawing.chromosomeBands.total;
	var annotationRequests = YAHOO.dasBrowser.genome.request.drawing.annotations.total;
	var totalRequests = bandRequests + annotationRequests;
	
	var bandRequestsCompleted = YAHOO.dasBrowser.genome.request.drawing.chromosomeBands.completed;
	var annotationRequestsCompleted = YAHOO.dasBrowser.genome.request.drawing.annotations.completed;
	var totalRequestsCompleted = bandRequestsCompleted + annotationRequestsCompleted;
	if (totalRequests == totalRequestsCompleted) {
		//console.log("completed!!!");
		YAHOO.example.container.wait.hide();
	}
}

function displayLoadingWindow(showLoadingWindow){
	YAHOO.example.container.wait = 
    new YAHOO.widget.Panel("wait",  
        { width: "240px", 
            fixedcenter: true, 
            close: false, 
            draggable: false, 
            zindex:4,
            modal: true,
            visible: false
        } 
    );
    YAHOO.example.container.wait.setHeader("Loading, please wait...");
    YAHOO.example.container.wait.setBody("<img src=\"http://us.i1.yimg.com/us.yimg.com/i/us/per/gr/gp/rel_interstitial_loading.gif\"/>");
    YAHOO.example.container.wait.render(document.body);
	if(showLoadingWindow){
		YAHOO.example.container.wait.show();	
	}
}



</script>
    </head>
    <body class="yui-skin-sam">
<div id="title" align="left" style="margin: 0px;"><img src="img/bioinfo.png"></div>
<!-- <div id="title" align="left" style="margin: 0px;"><img src="img/kdc_title2.gif"></div> -->

<div id="annotationListViewDisplay">Selected annotations</div>	
<div id="annotationListView"></div>

<div id="sequenceViewDisplay">Selected sequence</div>	
<div id="sequenceView"></div>

<div id="bandViewDisplay">Band</div>	
<div id="bandView"></div>

<div id="chromosomeViewDisplay">Chromosome</div>	
<div id="chromosomeView"></div>

<div id="karyotypeViewDisplay">Karyotype</div>	

<div id="karyotypeView"></div>

<div id="testDisplay">test</div>	
<div id="test"></div>

    	<p>
    	<div style="clear:both;" id="container4">f</div>
		<BR>
		<!--
		<div style="top: 30px; left: 30px; width: 400px; height: 12px; background-color: rgb(255, 0, 51);">dasdasd</div>
    	<div id="container3">
			<div id="_display_graphic">
				<ul style="width: 900px;" classname="_gr_list_class" class="_gr_list_class" id="_gr_list0">
					<li style="height: 13px; display: block;" id="gr_item33_disulphide bond_1">
						<div style="top: 0px; left: 0px; width: 200px; height: 13px;" classname="gr_div gr_row_02" class="gr_div gr_row_02">
							<span classname="gr_text_01" class="gr_text_01">
								disulphide bond
							</span>
						</div>
						
						<div style="top: 0px; left: 201px; width: 529px; height: 13px;" classname="gr_div gr_row_02" class="gr_div gr_row_02">
							<a style="border: 1px dotted rgb(102, 102, 102); font-size: 1px; top: 2px; left: 204.64px; width: 17.1104px; height: 7px; background-color: rgb(204, 204, 204);" classname="feature" class="feature" id="disulphide bond_299">
							</a>
						</div>
						
						<div style="top: 0px; left: 731px; width: 26px; height: 13px;" classname="gr_div gr_row_02" class="gr_div gr_row_02">
						</div>
						<div style="top: 0px; left: 758px; width: 140px; height: 13px;" classname="gr_div gr_row_02" class="gr_div gr_row_02">
							<a href="http://www.dasregistry.org/showdetails.jsp?auto_id=DS_311" target="_dasregistry" classname="gr_text_01" class="gr_text_01">
								Pfam Other Features
							</a>
						</div>
					</li>
				</ul>
    	</div>
		-->
		<p>

		<BR>

		
      
    </body>
</html>
